I don't really know how to tell if this indexing code is right or wrong so I'll assume it's right...