change to edit logic