implement retry feature