Change alias g to function

So that it can be invoked stand alone