update for totalCount