added logic to game