3D algorithm works for the most basic case p=8 c=2 n=b_agg=8 bw=4 b=1