Compact equals method