Augmented the example by including a function