refactor for BIT_TYPES