change string lengths from type int to size_t