using a queue