added require_template method