added .equals() method to Node class