adding trim method