change to mongo and add uplodPhoto function