Modify the function generation