extraced whitespace trimming to a plugin