debug pulse, add recover function