had a problem with size_t, they don't go negative, causing loop to go one extra time