prepared query for adding nodes to queues