updated external script and incorporated shakys state data