normalize remove final whitespaces