Added connected/0 function