Example with code replacement instead of hardcoding user code