Modifications in adaptative-threshold.clj