refactor EDA