template method pattern has been applied to the chain attribute