Added edit commitment logic

NOT WORKING CURRENTLY
edit is taken as an add action.