changes to make script work