removed the un-needed string length variables
set up the if -else structure