script to update public to open states