trim trailing whitespaces