How to measure the max and min levels