Faster history implementation