new implementation for equality