updated script reading in files