now also gets categories of given resources
returns now the categories of a resource.