Moved the retry to a instance method.