Adding in packet handling