Apply Template & Strategy pattern