migrating to mongo 2.x api