broke _g and _h out of functions