implemented cgstat