Refactored to meet Pact specs