return ids of resources, minor fixes