added whitespace handling