restructuring mongoose call