convert to different resource function