history stuff and pretty code snippet