change int with size_t for pn_