script is now fully automated