Ugly out-of-tutorial code