Cleaned up pgtFn example