wip compare - problem with reset max and min