update gvar handling and document
update