edit function added