wrong foldl calls led to tests not traversing docs. added open_doc with a Db reference as input