change totalEntries calculation