some minor changes and improvements