refactoring insts