Modified for Circular Queue to fifo