add debug param option; parameterize thresholds