Fixed string parsing problem; replaced with stringstreams. Added one new test case