some changes and improvements