creates processes and put them into different queues