code with complete fix for chefsheet issues