convert TRAP test to accumulator style