improved history selection selection
added statistics caching