modified script architecture