wip trimDeclarations
implement trim method