Script finally works!