debugging sample_gfunc