script changed to sorted order of variables