multiple thresholds not working, but there
Automatic style corrections courtesy of autopep8