gameLoop() implemented