convert array to list