changed list of arrays into array of arrays