Add some common methods to the pair class