full template method.