upgrade print_bit_value implementaion