finished changing Node class to use nodes instead of ints