Adjusted for better whitespace handling