integrating of moving loop into main game