That should work. However, it could be streamlined a little.
For instance, each time you are checking if the value is less or equal than a threshold, you do not need to check if it is above the other threshold value, since it already passed that test on the previous statements.
Basically, you...