new script for before data