make container and refactored game loop