modified script stuff