lots of changes and improvements