assign string to string pointer properly