update and removed gameloop from init