basic logic, UDP, packet handling