Updated simulator to use Queue