modifier payForResults() { require(msg.value == calculationFee); _; } function add(uint a, uint b) public payForResults payable returns(uint) { uint c = a + b; return c; }