changed long to int for start index and list size