Working on updating cb_coarse_expand to work like in the C++ version