add option to animate start and end indexes