fixed calculate recursive calls