Added testable implementation