normalizing whitespace in output