added function packet count