add threshold method