added iequality, edge case fixes