update to templates now working on modulus