decouple router and history