wheel code (slightly complex) | ScratchStats