moved request creation into retry loop