add template method implementation