refactor game clock