make resource_class a helper method