added script and made some changes