first stab at reading and using indices