fixing up var group system
issue #20