Tutorial code stubs from Tom Doherty