Refactored to use variable for student count