merge

merged branches; also switched it to check for “g” != false, which will
accept 0 or other “falsey” values