part way through changing Node class to use nodes instead of ints