modified solution and add game logic module