Code amended to include complete cases.