modified bin_string