changed form and fixed ajax