pass threshold as JSON for tests