fix refactoring with impl