slightly less hacky way of submitting the form data, which thankfully doesn't put the entire state of the page into the url