queues into stack