add complexity analysis