end of D iterations