added retry sql