finished retry algorithm

algorithm details are in
http://msdn.microsoft.com/en-us/library/ms175484.aspx