fixed mongodb query
tests are ready