changed string parameter passing to ref