added criteria for matching nodes to algorithms