brought retry var into local scope