provide an example of the template method pattern