Improve equals contract