added functionality to the example