add ping handler function