improving modal editing functionality