added trim method