fixing memory leak
opting for size_t