added currentPlayer variable