refactoring towards cake pattern