patched js to submit