adding details about implementation of special case when we known which node change to which type