adding binary_array function