add compare to type