Simplification of the retry decorator