implemented game loop at 60 ticks per second