packet building script