write blog about template method pattern