added parameterized packet-per-frame implementation