Alpha version of nwold's program.