work around for bug in stringstream
resolved merge conflicts from strinstream bug work-around