Added ability to get resource from an object