changed not to use textfile.