add queue as a parameter