get departments from DB