remove extraneous whitespaces