how to f of g