refactoring hibernation