Improved script