update basical functions of the game