appended gg func.