add size_t to silence compiler warning about int comparisons