Changed input from queue to query

Code review && potential merge?! :D