scripts restructured