simplified the require_template helper