change mongodb instance to singleton