Added function to example