use nearEquals for equality