more linked mode refactoring