refactor, use interfaces