added proper string handling