Pretty much working except data logging