Adding complexity checking.