added checks

to ensure that the correct numbers were entered