changed player2 logic