adding client history support and basic aggregate support