reduce the function for the students' model