implemented retry