replace load_template with require