change G logic