working on the mongo conversion