logic to trim whitespace