cake pattern as dynamic scope