refactor depending on static code analysis