Switch to generated function