updated history function, copied print loop from coredump(), and modified it. compiled without errors, not tested.