adding in template debug