add comparison operators and improve tests