improved 2-sum