updated for retry