packet handling improvement