Added Functionality To write data into mongo and read in Web proj