reduce cyclomatic complexity, reduce method length