now returning json for create and update mongo calls