correct query for departments on home