update mongooseModel to new architecture