switching tests to trap