added workers and queue solving logic