add function to display connected or not