getting idx1 to advance