reworked stats timing code