replaced an equality operator with underscore's isEqual function