modified using youtube and my brain | ScratchStats