update of files supplied by David Thomas.