added handling for sp chars in strings