implemented all function in ArrayBasedCollection except toSortedList()