adding code to actually read/write udp packets