how does this logic work | ScratchStats