added debugging for mongo