functionality for /departments