changed from testing equality of pointers to equality of underlying compositions