solved declaration problem

used ostringstream