changed form to use ajax