fixed the queue to be first in first out instead of a stack