update equals and test