updated trimming whitespace