Pass the line's index, i, to filter and map functions