various changes and improvements