fix error and add department service