add threshold