Rework the script