lots of adjustments and improvements