Changes 'document' to resource'