Add control of the start and end index.