func to add gfunc to list