added queries for related documents, added tests fro queries, added each-async package to deal with returned data