eval in function generation