cleaner game loop