moved evaluate in a thread and made edge type depend on node type