Adding a get method to the queue