Used queues to prevent threads from becoming fucked up
queues used