replaced sameStartingLocation with validPair. Checks for validPair combination