first creating the ArrayList then using addAll; otherwise an UnsupportedException can happen