update script to facilitate debuging