added error checking code
separated io code from main method. Now have to get subtraction error checking working.