handle multiple packets