changing order to FIFO properly