removing extra whitespace characters