removed scrap code from packet detection