adding threshold and test cases