demo refacto with udp multithreaded communication