added editing function