fixed indexing issue w/ [j]