working on starting and ending indices lists