add missing dependency
refactor has_bit to reuse mode