Use a new signed int ii instead of j (which is unsigned) to handle the