impl bin::write()
minor clean work