corrected vector to arraylist