added logic to sort players by position