correct equality checking