setter and getter added for class Pair