improve the implementation of relational operators