Use LongArrayList instead of ArrayList