test edit function