Add connected() function.