moved event prevent default into form submission