do calculation of arrangement