script reorganization