Added edit function