fix missing argument 3 for ping
remove some variables