refactor some existing classes that override the equal operator to use the 'equals' function instead