use a hash instead of a document