Pair Class Implementation