fixed Cyclomatic Complexity