added edit function