better whitespace handling