Added edit function.