Util module from "Playing with Chaos"