remove the unwanted extra spaces