Add adapter to make code testable