minor changes to code. more errata.