Added methods to compare objects