pulled out interfaces for document and mongo