change the structure of packet and add control handlers for pox