add some comment in packet.js
add sample generator