Loop index should be an unsigned type since it is never expected to be negative