add threshold in test