added functions for having a document at the base of the resource