* Added some error checking to problem 1.