several corrections and improvements