areSame function name changed to areEqual