Changed from array to ArrayList