Updated looping in FIFO to reflect Queue