added array and improved read from file