first version of data logging working.