modify h264wifi simulation code