Chapter 3 Example 5 on how to place a function and call it to action in your code.