Working version of the mongo module