template method & strategy