added threshold block