added parsing string logic