fix equality test
follow standard convention of returning an object