Untested version with support for MongoDB