don't iterate when no chars remaining