extracted out program logic into action that's testable