added debug for nextTurn