add template rule