simplify test-helper with 'f