fixed expected value in checkPair
implemented checkPair