changed the array to a list