implemented PPS counting