fixes and additions recommended by Andrew Solomon