still having problems with string to digit conversion