Slight improvement from previous attempt. Used fixed timer which doesn't stop at end of run. Also fixed weird formatting.