add find_resource function