removing dangling whitespace