refactoring for bits splitting