refactored to divide monitor and game