making the script work