decomposed some methods for clarity
treat whitespace as _