add reusable function example