checkout oroginal graph operations
added contracting / expanding of nodes according to current depthg