cleaned up $index rage