added TGS lib