modify getClassofDepartment to new version