Final version of retryMethod added