Updated the automated script to work