add funtions to enable recording
add timer