change behaviour with max and min changes