removing trailing and beginning whitespace