move the parsing to the packet class