added editing functionality