Adding g() function.
Merge pull request #2 from dmerrick/patch-1

Adding g() function.