Adding threshold and failure