ENH: Implemented dice computation. Do NOT take care of alignment for now.