strangely, I can't find a case where the the "new" algorithm produces
different results than the previous version .... so reverting!