add support for resource objects