added department function