add array calculation method