converted array to stringstream