removed unneeded code
removed more unneeded code
added check for isalpha input; cleaned up code