clock instructions and game loop