cleanup
cleanup
added write_bit()