changed isEqual()

changed isEqual() to use for..in instead of index-based for loop.