Add gi() function.