got the script working