added group varint encoding