refactored bakeout