better strip function -- don't remove all spaces, leave at most one inbetween