ray forward and backward
ray forward and backward
node type are determines at the beginning and when nodes are created