add template method design pattern.