Added retry for api call