moved initialization of order