add comments + refactoring
fix cs