replacing history with detailedHistory