A program I rewrote.