update game loop and logic

update game loop and logic