extracted retrier to utils