stop using global g