strie refactoring - work in progress