refactored game and rules