new example

how to create a function