make sure to call end_edit