modify edit note logic