refactoring attach detach holder