renamed bin to bin_ref