working program
data is saved to txt files
and easily plotted with plots.py