read-in and out of arrays