how history works