extract interface & refactor