simplify whitespace removal