improved bin_binary
small improvement of bin_binary