added dynamic mode, as well as ability to change the tolerance without restarting the app each time