Updated Pair to match prof's code.