put students into an aray, and refactored