Sent new threaded version. However, it only works with one thread