use correct indexing values