Working with connectivity of classes