refactor eda