changes to make the script work