Fixed the g->s in the function definition