refactored game timing