added complexity calculations