add resource and document