better string handling for method