add minor optimization by skipping blanks first during scanning.