updated for changing win condition