further tweaking of applyEdits()