changed int to size_t 6 times in the code.