edit function defined