[FIX] index to baseX is not python3 compatible
[FIX] removed iteritems to be python3 compatible