implement trimmedDeclarations method