improved the bagel examples