fixes and improvements
merge