improved sending of packets