extract interfaces to improve testability