added episode iteration to template