scanner with threads