Added write_bit