Added template method design pattern