objref fih0_, fih1_
fih0_ = new FInitializeHandler(0, "finit0()")
fih1_ = new FInitializeHandler(1, "finit1()")

proc finit0() { local i, gid, ix  localobj cell
	for pcitr(&i, &gid, 1) {
		cell = pc.gid2cell(gid)
		ix = cell.type()
		forsec cell.all { v = type_vinit.x[ix] }
		// but for TCR, states are initialized at -85
		if (ix == TCRtype) {
			forsec cell.all { v = -85 }
		}
	}
}

proc finit1() { local i, gid, ix  localobj cell
	// special handling for TCR voltage initialization
	for pcitr(&i, &gid, 1) {
		cell = pc.gid2cell(gid)
		ix = cell.type
		if (ix == TCRtype) {
			forsec cell.all { v = type_vinit.x[ix] }
		}
	}
}