write a program to strip trailing whitespace