The xkcd stuff would be better suited as a function