structure the example code a bit