bit refactoring