template method simple example