add whitespace detection for header