modified edit listener for add and edit parameters