pass stringref by value instead of by const&