add auto code the packet model