Redefine procedure in ex1.3 to make it more
effective (less comparisons).