add edit mode processing