split retry function

split retry function