cyclomatic complexity fixed