rewrite stoi and stof to use stringstreams instead.