tidying Edit interaction logic