let g directly be returned