fix and improvements