changed the in memory to mongo