Refactored cs