timer code merge it to main recording