added packet cleanup