changes suggested by Ben Mahler