updated for mongo 2.0