added vgs2_getdata function