keeping track of index instead of time and name, a simpler way of doing it.