add retry mechanism for promise