Updated the example function