detect and record the outcome