Added ping functionality.