modifed to send and recv UDP packet