added raw socket code