improved script order