changing order to FIFO