fixed complexity check