Refactored putsing each student to a block, iterating through each object in the array