add packet code