enter and exit editMode