text files and scripts

and average generator fixed