eliminate checkPing() and deleteClient() , remove end() from loops