changed js to submit form