changed string passing to const&