script rebuild