modify packet handler