submit.json post function updated