Extend equal function