changed graph and player2 logic