long code to do a simple thing | ScratchStats