rmove outer for loop in run()