remove dangling whitespaces