simple program to continuously record data