added checks to setElectrode

now checks for pairNum incrementing appropriately and doesn’t increment
pairNum if there was an issue with the range checking