add samples for "g" function