Modified to wait for multiple packets.