update mongo api to replace deprecated code
Merge pull request #2 from tchemineau/patch-1

update mongo api to replace deprecated code