refactoring cassa