code from "Learn C The Hard Way" by Zed Shaw