fixing indexing within a test