A couple thoughts here: * should probably only be supported on one side, and you want to return NO if there are a different number of components. That component count check would also prevent the code from crashing if it's passed a longer host1 than host2.