refacto & fix cs