add packet handling