template method design pattern example