ping() function added