created code to read from file then add file to array.