one could also just use a shared array instead of passing it in a queue