add start_ix and end_ix to the output