modify the submit logic