implemented code complexity analysis