add panic and recover