Fix major sloppiness with timing

timing is still sloppy, but should be more accurate now.