add g attribute to scg