Resolve cyclomatic complexity issue in evaluate