add retry times support