use size_t for return
clean up some return times to clear win64 warnings