proper equality for terms