refactoring berserk