added isEqual() to Node class