improvements to script
various updates