fixed up script