binary: make more idiomatic