convert config to array, create one method per threshold