modify_algorithm fixed so not using node_load