creating gstats infrastructure