add ping2 function and change namespace