replace size_t with uint32_t or int