refactoring - adding the student count as a variable