bit refactor