we need to optimize when adding an edit constraint