many updates and fixes