My improvements to #7 | ScratchStats