starting to write general function for reading array from text file