add editing functionality