Modified the retrieve-reosurce() function to return only the resource
itself.