passing string by reference instaed of copying