code cleanup
add udp ping for upstream checking