updated the scripts. still needs to be tested