adding code for segmenting recorded demo