edame refactoring