game refactored and working