updated bakery problem