tempalte method pattern