changed to generic isWhitespace, tried to fix indentation errors