Change the new functions to use size_t