cool cake refactor