integer and trim method