Convert to using ect templates