refactor Cake