enhanced script for automated deployment