Constructor in mongo.cpp