added trim to remove traling whitespace