enabled to iterate through threshold range dump each result picture into directory
added reversible function