refactor method to get from categories/child categories as well