binary refactoring