added template method sample