Refactor student selection