better string handling (hopefully)