implemented the recording of scans and data