add generic packet handler