modify the output thread's container from linkedlist to arraylist