edited form.js to reflect simpler flow